#include "Global.h"
#include "OTexture2D.h"

float Global::s_dashedVOffset = 0;
int Global::N1 = 0;
int Global::N2 = 0;
int Global::N3 = 0;
int Global::N4 = 0;
int Global::N5 = 0;

UInt Global::s_frameCnt = 0;
bool Global::s_isBlinkShowing = true;
float Global::s_blinkProgress = 0;

bool Global::s_isDarkMode = true;

osg::ref_ptr<osg::Texture2D> Global::s_dayBgTexture = nullptr;
osg::ref_ptr<osg::Texture2D> Global::s_nightBgTexture = nullptr;

osg::Texture2D* Global::currentBgTexture() {
	if (s_isDarkMode) {
		if (!s_nightBgTexture)
			s_nightBgTexture = OTexture2D::createFromImage(Config::View3D_BgDarkImgPath);
		return s_nightBgTexture;
	}
	if (!s_dayBgTexture)
		s_dayBgTexture = OTexture2D::createFromImage(Config::View3D_BgLightImgPath);
	return s_dayBgTexture;
}